<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="ad-box"></div>
    <script src="http://zxxkstatic.zxxk.com/xkwjs/lib/jquery-1.10.2.js?v=0.20472"></script>
    <script>
      $.ajax({
        type: "GET",
        url: "http://localhost:2000/ad/board/888",
        data: { num: 1 },
        dataType: "json",
        xhrFields: {
          withCredentials: true, //允许跨域带Cookie
        },
        success: function (data) {
          document.querySelector("#ad-box").innerHTML = data.html;
        },
      });
    </script>
  </body>
</html>
